#include "Mutex.h"

namespace zg_util{
    Mutex::Mutex()
    {
        pthread_mutexattr_t attr;
        pthread_mutexattr_init(&attr);
        if (pthread_mutex_init(&_mutex, &attr))
        {
            pthread_mutexattr_destroy(&attr);
        }
        pthread_mutexattr_destroy(&attr);
    }

    Mutex::~Mutex()
    {
        pthread_mutex_destroy(&_mutex);
    }

}